﻿<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" ValidateRequest="false" CodeBehind="PostForum.aspx.cs" Inherits="NEWS.Admin.PostForum" %>
<asp:Content ID="content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>    
<script language="javascript" type="text/javascript">
    function goback()
    {
        history.back([-1]);
    }
</script>
    <div class="dashboard">
        <h2 class="blockhead">
            <asp:Label ID="lblheader" runat="server" Text="Đăng bài viết"></asp:Label>
        </h2>
		<div class="blockbody formcontrols">
			<div class="sectioncachon">
			    <div class="blockrow">
					<div>
					   <asp:Label ID="message" runat="server" Font-Bold="True" Font-Size="Small" ForeColor="Red"></asp:Label>
					</div>
				</div>
                <asp:Panel ID="pn_iduser" runat="server" Visible="true" >
                    <div class="blockrow">
					    <div>
					        <asp:Label ID="lblforumnewsid" runat="server" Text="Mã bài viết: "></asp:Label>
					         <asp:TextBox ID="txtforumnewsid" ReadOnly="true" Enabled="false" runat="server"></asp:TextBox>
					    </div>
				    </div>
				    <div class="blockrow">
					    <div>
					        <asp:Label ID="lblusername" runat="server" Text="Tên người đăng: "></asp:Label>
					        <asp:TextBox ID="txtusername" ReadOnly="true" Enabled="false" runat="server"></asp:TextBox>
					    </div>
				    </div>
                </asp:Panel>
                <asp:Panel ID="pn2" runat="server">
                    <div class="blockrow">
					    <div>
					        <asp:Label ID="lbltitile" runat="server" Text="Tiêu đề: "></asp:Label>
					    </div>
					    <div>
					        <asp:TextBox ID="txttitle" runat="server" Width="540px"></asp:TextBox>
					        <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" 
                                ControlToValidate="txttitle" ErrorMessage="?"></asp:RequiredFieldValidator>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator6" runat="server" 
                                ControlToValidate="txttitle" ErrorMessage="    Độ dài tối thiểu &gt; 2 và tối đa là 100" 
                                ValidationExpression="^([\S\s]{3,100})$"></asp:RegularExpressionValidator>
					    </div>
				    </div>
				    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                            <ContentTemplate>
                        <div class="blockrow">                    
					        <div>                            
				                <asp:Label ID="lbldanhmuclon" runat="server" Text="Chuyên mục: "></asp:Label>
                                <asp:DropDownList ID="drldanhmuc" Width="200px" AutoPostBack="true" DataTextField="Value" 
                                    DataValueField="Key" runat="server" 
                                    onselectedindexchanged="drldanhmuc_SelectedIndexChanged">
                                </asp:DropDownList>                                                                                        
					        </div>					        					    
				        </div>
				        <div class="blockrow">
				            <div>
					            <asp:Label ID="lbldanhmuccon" runat="server" Text="Chủ đề: "></asp:Label>
                                <asp:DropDownList ID="dldanhmuccon" Width="200px" AutoPostBack="true" DataTextField="Value" DataValueField="Key" runat="server">
                                </asp:DropDownList>
					        </div>
				        </div>
				        </ContentTemplate>
                    </asp:UpdatePanel>
                </asp:Panel>
                    <asp:Panel ID="pn_ngay" runat="server">
                     <div class="blockrow">
					    <div>
					        <asp:Label ID="lblcreateddate" runat="server" Text="Ngày đăng: "></asp:Label> 
					        <asp:Label ID="lbldatecreated" runat="server" Text=""></asp:Label>
					    </div>
				     </div>
                	<div class="blockrow">
					    <div>
					        <asp:Label ID="lblupdatedate" runat="server" Text="Ngày cập nhật gần nhất: "></asp:Label> 
					        <asp:Label ID="lbldateupdate" runat="server" Text=""></asp:Label>
					    </div>
				    </div>
                    <asp:Panel ID="pn_solanxem" runat="server">
				        <div class="blockrow">
					        <div>
					            <asp:Label ID="lblviewcount" runat="server" Text="Số lần xem: "></asp:Label> 
					            <asp:Label ID="txtviewcount" runat="server" Text=""></asp:Label>
					        </div>
				        </div>
				    </asp:Panel>
                  </asp:Panel>                                                            
				<div class="blockrow">
					<div>
					    <asp:Label ID="lblcontent" runat="server" Text="Nội dung: "></asp:Label>
					</div>					
					<script type="text/javascript" src="../ckeditor/ckeditor.js"></script>
                        <script type="text/javascript">

                            window.onload = function () {

                                CKEDITOR.replace('ctl00_ContentPlaceHolder1_txtcontent');

                            }
                        </script>
					<div>
                        <asp:TextBox ID="txtcontent" runat="server"  TextMode="MultiLine" ></asp:TextBox>
					</div>
				</div>
			</div>
		</div>
		<div class="rightbutton">
		<span style="float:right;">
            <asp:Button ID="btndangtin" runat="server" Text="Gửi bài viết" 
                onclick="btndangtin_Click" CausesValidation="True" />
            <asp:Button ID="btnquaylai" runat="server" Text="Quay Lại" CausesValidation="false" 
                onclick="btnquaylai_Click" />
        </span> 
		</div>
    </div>
</asp:Content>
